﻿using System;
using System.Collections.Generic;
using DG.Tweening;
using GTA;
using MotionFramework.Audio;
using MotionFramework.Window;
using UnityEngine;
using UnityEngine.UI;
using MotionFramework.Event;
using TMPro;

namespace offline2048
{
    public class UIShop : MonoBehaviour
    {
        private EventGroup EventGrouper = new EventGroup();
        //头部=========================================================================
        private Text m_TxtTopCoin;
        private Text m_TxtTopDoller;

        private Button m_BtnTopBack;
        private Button m_BtnRevise;
        private Text m_TxtReviseFont;

        private Button m_RuleBtn;
        //paypal部分===================================================================
        private GameObject m_PaypalRoot;
        private UIShopPaypaling m_PaypalingItem_1;
        private UIShopPaypaling m_PaypalingItem_2;
        private UIShopPaypaling m_PaypalingItem_3;
        private UIShopPaypaling m_PaypalingItem_4;
        private UIShopPaypaling m_PaypalingItem_5;
        private UIShopPaypalItem m_PaypalItem_1;
        private UIShopPaypalItem m_PaypalItem_2;
        private UIShopPaypalItem m_PaypalItem_3;
        private UIShopPaypalItem m_PaypalItem_4;
        private UIShopPaypalItem m_PaypalItem_5;
        //cash部分=====================================================================
        private GameObject m_CashRoot;
        private UIShopCashing m_CashingItem_1;
        private UIShopCashing m_CashingItem_2;
        private UIShopCashing m_CashingItem_3;
        private UIShopCashing m_CashingItem_4;
        private UIShopCashing m_CashingItem_5;
        private UIShopCashItem m_CashItem_1;
        private UIShopCashItem m_CashItem_2;
        private UIShopCashItem m_CashItem_3;
        private UIShopCashItem m_CashItem_4;
        private UIShopCashItem m_CashItem_5;
        //弹框部分======================================================================
        //tips_1======================================================================
        private GameObject m_ShopTips_1;
        private Text m_Tips_1_TxtShopProgress;
        private Image m_Tips_1_ImgShopProgress;
        private Button m_Tips_1_BtnPay;
        private Button m_Tips_1_BtnCancel;
        private Button m_Tips_1_BtnClose;
        //tips_2======================================================================
        private GameObject m_ShopTips_2;
        private Text m_Tips_2_TxtContent_1;
        private Text m_Tips_2_TxtContent_2;
        private Text m_Tips_2_TxtContent_3;
        private Button m_Tips_2_BtnConfirm;
        private Button m_Tips_2_BtnCancel;
        //tips_3======================================================================
        private GameObject m_ShopTips_3;
        private Text m_Tips_3_TxtContent_1;
        private Text m_Tips_3_TxtContent_2;
        private Text m_Tips_3_TxtContent_3;
        private Text m_Tips_3_TxtContent_4;
        private Text m_Tips_3_TxtContent_5;
        private Text m_Tips_3_TxtContent_6;
        private Text m_Tips_3_TxtContent_7;
        private Text m_Tips_3_TxtContent_8;
        private Button m_Tips_3_BtnConfirm;
        private Button m_Tips_3_BtnCancel;
        private Button m_Tips_3_BtnClose;
        //tips_4======================================================================
        private GameObject m_ShopTips_4;
        private Text m_Tips_4_TxtContent_1;
        private Text m_Tips_4_TxtContent_2;
        private Text m_Tips_4_TxtContent_3;
        private Text m_Tips_4_TxtContent_4;
        private Text m_Tips_4_TxtContent_5;
        private Button m_Tips_4_BtnConfirm;
        private Button m_Tips_4_BtnWithdraw;
        //tips_5======================================================================
        private GameObject m_ShopTips_5;
        private Text m_Tips_5_TxtContent_1;
        private Text m_Tips_5_TxtContent_2;
        private Button m_Tips_5_BtnCash;
        private GameObject m_Tips_5_ImgCashSelect;
        private Button m_Tips_5_BtnPaypal;
        private GameObject m_Tips_5_ImgPaypalSelect;
        private Button m_Tips_5_BtnClose;
        private Button m_Tips_5_BtnSubmit;
        private InputField m_Tips_5_InputField_1;
        private InputField m_Tips_5_InputField_2;
        private InputField m_Tips_5_InputField_3;
        private Text m_Tips_5_InputFieldDefault;
        //tips_6======================================================================
        private GameObject m_ShopTips_6;
        private Text m_Tips_6_TxtTitle;
        private Text m_Tips_6_TxtDollerNumber;
        private Button m_Tips_6_BtnOk;
        private Button m_Tips_6_BtnNo;
        //tips_7======================================================================
        private GameObject m_ShopTips_7;
        private Text m_Tips_7_TxtTitle;
        //tips_8======================================================================
        private GameObject m_ShopTips_8;
        private Button m_Tips_8_BtnClose;
        //tips_9======================================================================
        private GameObject m_ShopTips_9;
        //tips_10======================================================================
        private GameObject m_ShopTips_10;
        private Text m_Tips_10_Content_1;
        private Button m_Tips_10_Claim;
        private Button m_Tips_10_BtnClose;
        //tips_11======================================================================
        private GameObject m_ShopTips_11;
        private Text m_Tips_11_TxtProgress;
        private Image m_Tips_11_ImgProgress;
        private Button m_Tips_11_BtnClose;
        private Button m_Tips_11_BtnCancel;
        private Button m_Tips_11_BtnPay;
        //业务逻辑======================================================================
        private int m_CurTouchItemIndex;
        private int m_CurTouchPayingItemIndex;
        //多语音部分=====================================================================
        private Text m_TxtMoneyTitle;
        
        private Tweener m_PaypalItemAnime;

        void Awake()
        {
            OnCreate();
        }

        void Start()
        {
            
        }

        public void OnCreate()
        {
            //头部=========================================================================
            m_TxtTopCoin = this.transform.Find("Page/UITopBar/Bg/CoinBtn/Text").GetComponent<Text>();
            m_TxtTopDoller = this.transform.Find("Page/UITopBar/Bg/DollerBtn/Text").GetComponent<Text>();
            
            m_BtnTopBack = this.transform.Find("Page/UITopBar/Bg/BackBtn").GetComponent<Button>();
            m_BtnRevise = this.transform.Find("Page/ShopReviseItem/ReviseBtn").GetComponent<Button>();
            m_TxtReviseFont = this.transform.Find("Page/ShopReviseItem/FontText").GetComponent<Text>();
            if (UIShopManager.Instance.GetWithDrawEmail().Equals(""))
            {
                m_TxtReviseFont.text = Utils.GetTextByID("900039");
            }
            else
            {
                m_TxtReviseFont.text = UIShopManager.Instance.GetWithDrawAccount();
            }

            m_RuleBtn = this.transform.Find("Page/RuleBtn").GetComponent<Button>();
            m_RuleBtn.onClick.AddListener(OnClickRuleBtn);
            //paypal部分===================================================================
            m_PaypalRoot = this.transform.Find("Page/PayPalRoot").gameObject;
            m_PaypalingItem_1 = this.transform.Find("Page/PayPalRoot/ScrollView/Viewport/Content/ShopPaypalItemLayout/ShopPaypalItem_1").gameObject.GetComponent<UIShopPaypaling>();
            m_PaypalingItem_2 = this.transform.Find("Page/PayPalRoot/ScrollView/Viewport/Content/ShopPaypalItemLayout/ShopPaypalItem_2").gameObject.GetComponent<UIShopPaypaling>();
            m_PaypalingItem_3 = this.transform.Find("Page/PayPalRoot/ScrollView/Viewport/Content/ShopPaypalItemLayout/ShopPaypalItem_3").gameObject.GetComponent<UIShopPaypaling>();
            m_PaypalingItem_4 = this.transform.Find("Page/PayPalRoot/ScrollView/Viewport/Content/ShopPaypalItemLayout/ShopPaypalItem_4").gameObject.GetComponent<UIShopPaypaling>();
            m_PaypalingItem_5 = this.transform.Find("Page/PayPalRoot/ScrollView/Viewport/Content/ShopPaypalItemLayout/ShopPaypalItem_5").gameObject.GetComponent<UIShopPaypaling>();
            m_PaypalItem_1 = this.transform.Find("Page/PayPalRoot/ScrollView/Viewport/Content/ShopPaypaILayout/ShopPaypalItem_1").gameObject.GetComponent<UIShopPaypalItem>();
            m_PaypalItem_2 = this.transform.Find("Page/PayPalRoot/ScrollView/Viewport/Content/ShopPaypaILayout/ShopPaypalItem_2").gameObject.GetComponent<UIShopPaypalItem>();
            m_PaypalItem_3 = this.transform.Find("Page/PayPalRoot/ScrollView/Viewport/Content/ShopPaypaILayout/ShopPaypalItem_3").gameObject.GetComponent<UIShopPaypalItem>();
            m_PaypalItem_4 = this.transform.Find("Page/PayPalRoot/ScrollView/Viewport/Content/ShopPaypaILayout/ShopPaypalItem_4").gameObject.GetComponent<UIShopPaypalItem>();
            m_PaypalItem_5 = this.transform.Find("Page/PayPalRoot/ScrollView/Viewport/Content/ShopPaypaILayout/ShopPaypalItem_5").gameObject.GetComponent<UIShopPaypalItem>();
            //cash部分=====================================================================
            m_CashRoot = this.transform.Find("Page/CashRoot").gameObject;
            m_CashingItem_1 = this.transform.Find("Page/CashRoot/ScrollView/Viewport/Content/ShopCashItemLayout/ShopCashItem_1").gameObject.GetComponent<UIShopCashing>();
            m_CashingItem_2 = this.transform.Find("Page/CashRoot/ScrollView/Viewport/Content/ShopCashItemLayout/ShopCashItem_2").gameObject.GetComponent<UIShopCashing>();
            m_CashingItem_3 = this.transform.Find("Page/CashRoot/ScrollView/Viewport/Content/ShopCashItemLayout/ShopCashItem_3").gameObject.GetComponent<UIShopCashing>();
            m_CashingItem_4 = this.transform.Find("Page/CashRoot/ScrollView/Viewport/Content/ShopCashItemLayout/ShopCashItem_4").gameObject.GetComponent<UIShopCashing>();
            m_CashingItem_5 = this.transform.Find("Page/CashRoot/ScrollView/Viewport/Content/ShopCashItemLayout/ShopCashItem_5").gameObject.GetComponent<UIShopCashing>();
            m_CashItem_1 = this.transform.Find("Page/CashRoot/ScrollView/Viewport/Content/ShopCashLayout/ShopCashItem_1").gameObject.GetComponent<UIShopCashItem>();
            m_CashItem_2 = this.transform.Find("Page/CashRoot/ScrollView/Viewport/Content/ShopCashLayout/ShopCashItem_2").gameObject.GetComponent<UIShopCashItem>();
            m_CashItem_3 = this.transform.Find("Page/CashRoot/ScrollView/Viewport/Content/ShopCashLayout/ShopCashItem_3").gameObject.GetComponent<UIShopCashItem>();
            m_CashItem_4 = this.transform.Find("Page/CashRoot/ScrollView/Viewport/Content/ShopCashLayout/ShopCashItem_4").gameObject.GetComponent<UIShopCashItem>();
            m_CashItem_5 = this.transform.Find("Page/CashRoot/ScrollView/Viewport/Content/ShopCashLayout/ShopCashItem_5").gameObject.GetComponent<UIShopCashItem>();
            //弹框部分======================================================================
            //tips_1======================================================================
            m_ShopTips_1 = this.transform.Find("ShopTips_1").gameObject;
            m_Tips_1_TxtShopProgress = this.transform.Find("ShopTips_1/Group/LoadingBg/TextNumber").GetComponent<Text>();
            m_Tips_1_ImgShopProgress = this.transform.Find("ShopTips_1/Group/LoadingBg/Loading").GetComponent<Image>();
            m_Tips_1_BtnPay = this.transform.Find("ShopTips_1/Group/PayBtn").GetComponent<Button>();
            m_Tips_1_BtnCancel = this.transform.Find("ShopTips_1/Group/CancelBtn").GetComponent<Button>();
            m_Tips_1_BtnClose = this.transform.Find("ShopTips_1/Group/Button").GetComponent<Button>();
            
            m_Tips_1_BtnPay.onClick.AddListener(OnClickTips_1_PayBtn);
            m_Tips_1_BtnCancel.onClick.AddListener(OnClickTips_1_CancelBtn);
            m_Tips_1_BtnClose.onClick.AddListener(OnClickTips_1_CloseBtn);
            //tips_2======================================================================
            m_ShopTips_2 = this.transform.Find("ShopTips_2").gameObject;
            m_Tips_2_TxtContent_1 = this.transform.Find("ShopTips_2/Group/Content_1").GetComponent<Text>();
            m_Tips_2_TxtContent_2 = this.transform.Find("ShopTips_2/Group/Content_2").GetComponent<Text>();
            m_Tips_2_TxtContent_3 = GetUIComponent<Text>("ShopTips_2/Group/Content_3");
            m_Tips_2_BtnConfirm = GetUIComponent<Button>("ShopTips_2/Group/ConfirmBtn");
            m_Tips_2_BtnCancel = GetUIComponent<Button>("ShopTips_2/Group/CancelBtn");
            
            m_Tips_2_BtnConfirm.onClick.AddListener(OnClickTips_2_ConfirmBtn);
            m_Tips_2_BtnCancel.onClick.AddListener(OnClickTips_2_CancelBtn);
            //tips_3======================================================================
            m_ShopTips_3 = GetUIElement("ShopTips_3").gameObject;
            m_Tips_3_TxtContent_1 = GetUIComponent<Text>("ShopTips_3/Group/Content_1");
            m_Tips_3_TxtContent_2 = GetUIComponent<Text>("ShopTips_3/Group/Content_2");
            m_Tips_3_TxtContent_3 = GetUIComponent<Text>("ShopTips_3/Group/Content_3");
            m_Tips_3_TxtContent_4 = GetUIComponent<Text>("ShopTips_3/Group/Content_4");
            m_Tips_3_TxtContent_5 = GetUIComponent<Text>("ShopTips_3/Group/Content_5");
            m_Tips_3_TxtContent_6 = GetUIComponent<Text>("ShopTips_3/Group/Content_6");
            m_Tips_3_TxtContent_7 = GetUIComponent<Text>("ShopTips_3/Group/Content_7");
            m_Tips_3_TxtContent_8 = GetUIComponent<Text>("ShopTips_3/Group/Content_8");
            m_Tips_3_BtnConfirm = GetUIComponent<Button>("ShopTips_3/Group/ConfirmBtn");
            m_Tips_3_BtnCancel = GetUIComponent<Button>("ShopTips_3/Group/CancelBtn");
            m_Tips_3_BtnClose = GetUIComponent<Button>("ShopTips_3/Group/Button");
            
            m_Tips_3_BtnConfirm.onClick.AddListener(OnClickTips_3_ConfirmBtn);
            m_Tips_3_BtnCancel.onClick.AddListener(OnClickTips_3_CancelBtn);
            m_Tips_3_BtnClose.onClick.AddListener(OnClickTips_3_CloseBtn);
            //tips_4======================================================================
            m_ShopTips_4 = GetUIElement("ShopTips_4").gameObject;
            m_Tips_4_TxtContent_1 = GetUIComponent<Text>("ShopTips_4/Group/Content_1");
            m_Tips_4_TxtContent_2 = GetUIComponent<Text>("ShopTips_4/Group/Content_2");
            m_Tips_4_TxtContent_3 = GetUIComponent<Text>("ShopTips_4/Group/Content_3");
            m_Tips_4_TxtContent_4 = GetUIComponent<Text>("ShopTips_4/Group/Content_4");
            m_Tips_4_TxtContent_5 = GetUIComponent<Text>("ShopTips_4/Group/Content_5");
            m_Tips_4_BtnConfirm = GetUIComponent<Button>("ShopTips_4/Group/ConfirmBtn");
            m_Tips_4_BtnWithdraw = GetUIComponent<Button>("ShopTips_4/Group/WithdrawBtn");
                
            m_Tips_4_BtnConfirm.onClick.AddListener(OnClickTips_4_ConfirmBtn);
            m_Tips_4_BtnWithdraw.onClick.AddListener(OnClickTips_4_WithdrawBtn);
            //tips_5======================================================================
            m_ShopTips_5 = GetUIElement("ShopTips_5").gameObject;
            m_Tips_5_TxtContent_1 = GetUIComponent<Text>("ShopTips_5/Group/Title_1/Content_1");
            m_Tips_5_TxtContent_2 = GetUIComponent<Text>("ShopTips_5/Group/Title_1/Content_2");
            m_Tips_5_BtnCash = GetUIComponent<Button>("ShopTips_5/Group/Btn_Cash");
            m_Tips_5_ImgCashSelect = GetUIElement("ShopTips_5/Group/Btn_Cash/Cash").gameObject;
            m_Tips_5_BtnPaypal = GetUIComponent<Button>("ShopTips_5/Group/Btn_Paypal");
            m_Tips_5_ImgPaypalSelect = GetUIElement("ShopTips_5/Group/Btn_Paypal/PayPal").gameObject;
            m_Tips_5_BtnClose = GetUIComponent<Button>("ShopTips_5/Group/Btn_Close");
            m_Tips_5_BtnSubmit = GetUIComponent<Button>("ShopTips_5/Group/Btn_Submit"); 
            m_Tips_5_InputField_1 = GetUIComponent<InputField>("ShopTips_5/Group/ContentButton/IF_Content_1"); 
            m_Tips_5_InputField_2 = GetUIComponent<InputField>("ShopTips_5/Group/ContentButton/IF_Content_2");
            m_Tips_5_InputField_3 = GetUIComponent<InputField>("ShopTips_5/Group/ContentButton/IF_Content_3");
            
            m_Tips_5_InputFieldDefault = GetUIComponent<Text>("ShopTips_5/Group/ContentButton/IF_Content_3/Placeholder");
            
            m_Tips_5_BtnCash.onClick.AddListener(OnClickTips_5_CashBtn);
            m_Tips_5_BtnPaypal.onClick.AddListener(OnClickTips_5_PaypalBtn);
            m_Tips_5_BtnClose.onClick.AddListener(OnClickTips_5_CloseBtn);
            m_Tips_5_BtnSubmit.onClick.AddListener(OnClickTips_5_SubmitBtn);
            //tips_6======================================================================
            m_ShopTips_6 = GetUIElement("ShopTips_6").gameObject;
            m_Tips_6_TxtTitle = GetUIComponent<Text>("ShopTips_6/Group/Text");
            m_Tips_6_TxtDollerNumber = GetUIComponent<Text>("ShopTips_6/Group/Txt_Number");
            m_Tips_6_BtnOk = GetUIComponent<Button>("ShopTips_6/Group/Btn_Ok");
            m_Tips_6_BtnNo = GetUIComponent<Button>("ShopTips_6/Group/Btn_No");
            
            m_Tips_6_BtnOk.onClick.AddListener(OnClickTips_6_OkBtn);
            m_Tips_6_BtnNo.onClick.AddListener(OnClickTips_6_NoBtn);
            //tips_7======================================================================
            m_ShopTips_7 = GetUIElement("ShopTips_7").gameObject;
            m_Tips_7_TxtTitle = GetUIComponent<Text>("ShopTips_7/Text");
            m_Tips_7_TxtTitle.text = Utils.GetTextByID("900134");
            m_ShopTips_7.SetActive(false);
            //tips_8======================================================================
            m_ShopTips_8 = GetUIElement("ShopTips_8").gameObject;
            m_Tips_8_BtnClose = GetUIComponent<Button>("ShopTips_8/Group/Button");
            
            m_Tips_8_BtnClose.onClick.AddListener(OnClickTips8CloseBtn);
            //tips_9======================================================================
            m_ShopTips_9 = GetUIElement("ShopTips_9").gameObject;
            //tips_10======================================================================
            m_ShopTips_10 = GetUIElement("ShopTips_10").gameObject;
            m_Tips_10_Content_1 = GetUIComponent<Text>("ShopTips_10/Group/Content_1");
            m_Tips_10_Claim = GetUIComponent<Button>("ShopTips_10/Group/ClaimBtn");
            m_Tips_10_BtnClose = GetUIComponent<Button>("ShopTips_10/Group/Button");
            
            m_Tips_10_Claim.onClick.AddListener(OnClickTips_10_ClaimBtn);
            m_Tips_10_BtnClose.onClick.AddListener(OnClickTips_10_CloseBtn);
            //tips_11======================================================================
            m_ShopTips_11 = GetUIElement("ShopTips_11").gameObject;
            m_Tips_11_TxtProgress = GetUIComponent<Text>("ShopTips_11/Group/LoadingBg/TextNumber");
            m_Tips_11_ImgProgress = GetUIComponent<Image>("ShopTips_11/Group/LoadingBg/Loading");
            m_Tips_11_BtnClose = GetUIComponent<Button>("ShopTips_11/Group/Button");
            m_Tips_11_BtnCancel = GetUIComponent<Button>("ShopTips_11/Group/CancelBtn");
            m_Tips_11_BtnPay = GetUIComponent<Button>("ShopTips_11/Group/PayBtn");
            
            m_Tips_11_BtnClose.onClick.AddListener(OnClickTips_11_CloseBtn);
            m_Tips_11_BtnCancel.onClick.AddListener(OnClickTips_11_CancelBtn);
            m_Tips_11_BtnPay.onClick.AddListener(OnClickTips_11_PayBtn);
            
            //按钮处理========================================================================
            m_BtnTopBack.onClick.AddListener(OnClickTopBackBtn);
            m_BtnRevise.onClick.AddListener(OnClickReviseBtn);
            //多语音部分=====================================================================
            m_TxtMoneyTitle = GetUIComponent<Text>("Page/Txt_MoneyTitle");
            
            //ADSHelper.HideBannerAd();
            
            EventGrouper.AddListener<ShopEvent.RefreshShop>(HandleEvent);
            EventGrouper.AddListener<ShopEvent.OnTouchItem>(HandleEvent);
            EventGrouper.AddListener<ShopEvent.OnTouchPayingItem>(HandleEvent);
            EventGrouper.AddListener<ShopEvent.OnTouchCashOutItem>(HandleEvent);
            EventGrouper.AddListener<ShopEvent.OnTouchPayItem>(HandleEvent);
            EventGrouper.AddListener<ShopEvent.OnTouchLastStateItem>(HandleEvent);
            EventGrouper.AddListener<ShopEvent.OnTouchReStore>(HandleEvent);
            EventGrouper.AddListener<ShopEvent.OnTouchRightNowItem>(HandleEvent);
            
            //InitData();
            
            //触发新手引导
            //GuideManager.Instance.CheckRunGuide(GuideTriggerType.OpenShopUI);
        }

        private GameObject GetUIElement(string path)
        {
            return this.transform.Find(path).gameObject;
        }
        
        private T GetUIComponent<T>(string path)
        {
            return this.transform.Find(path).gameObject.GetComponent<T>();
        }
        
        public void OnDestroy()
        {
            ReleasePalingItem();
            
            // 移除所有缓存的事件监听
            EventGrouper.RemoveAllListener();
            
            /*if (UserLayerManager.Instance.IsOrganic())
            {
                ADSHelper.ShowBannerAd();
            }
            else
            {
                ADSHelper.HideBannerAd();
            }*/
        }

        private void ReleasePalingItem()
        {
            m_PaypalingItem_1.DeleteItem();
            m_PaypalingItem_2.DeleteItem();
            m_PaypalingItem_3.DeleteItem();
            m_PaypalingItem_4.DeleteItem();
            m_PaypalingItem_5.DeleteItem();
            m_CashingItem_1.DeleteItem();
            m_CashingItem_2.DeleteItem();
            m_CashingItem_3.DeleteItem();
            m_CashingItem_4.DeleteItem();
            m_CashingItem_5.DeleteItem();
        }
        
        public void OnUpdate()
        {

        }

        public void RefreshShopList(bool successRefresh)
        {

        }

        private void HandleEvent(IEventMessage msg)
        {
            if (msg is ShopEvent.RefreshShop)
            {
                bool isSuccessIap = (msg as ShopEvent.RefreshShop).IsSuccessIAP;
                RefreshShopList(isSuccessIap);
            }
            else if (msg is ShopEvent.OnTouchItem)
            {
                ShopEvent.OnTouchItem _event = msg as ShopEvent.OnTouchItem;
                OnTouchItem(_event.m_Index);
            }
            else if (msg is ShopEvent.OnTouchPayingItem)
            {
                ShopEvent.OnTouchPayingItem _event = msg as ShopEvent.OnTouchPayingItem;
                OnTouchPayingItem(_event.m_Index);
            }
            else if (msg is ShopEvent.OnTouchCashOutItem)
            {
                ShopEvent.OnTouchCashOutItem _event = msg as ShopEvent.OnTouchCashOutItem;
                OnTouchCashOutItem(_event.m_Index);
            }
            else if (msg is ShopEvent.OnTouchPayItem)
            {
                ShopEvent.OnTouchPayItem _event = msg as ShopEvent.OnTouchPayItem;
                OnTouchPayItem(_event.m_Index);
            }
            else if (msg is ShopEvent.OnTouchLastStateItem)
            {
                ShopEvent.OnTouchLastStateItem _event = msg as ShopEvent.OnTouchLastStateItem;
                OnTouchLastStateItem(_event.m_Index);
            }
            else if (msg is ShopEvent.OnTouchReStore)
            {
                ShopEvent.OnTouchReStore _event = msg as ShopEvent.OnTouchReStore;
                OnTouchReStoreItem(_event.m_Index);
            }
            else if (msg is ShopEvent.OnTouchRightNowItem)
            {
                ShopEvent.OnTouchRightNowItem _event = msg as ShopEvent.OnTouchRightNowItem;
                OnTouchRightNowItem(_event.m_Index);
            }
        }

        public void InitData()
        {
            m_CurTouchItemIndex = -1;
            
            m_PaypalItem_1.InitData(1);
            m_PaypalItem_2.InitData(2);
            m_PaypalItem_3.InitData(3);
            m_PaypalItem_4.InitData(4);
            m_PaypalItem_5.InitData(5);
            
            m_CashItem_1.InitData(1);
            m_CashItem_2.InitData(2);
            m_CashItem_3.InitData(3);
            m_CashItem_4.InitData(4);
            m_CashItem_5.InitData(5);
            if (UIShopManager.Instance.GetShopWithDrawChannel() == 0)
            {
                //0是cashapp
                m_PaypalRoot.SetActive(false);
                m_CashRoot.SetActive(true);
            }
            else
            {
                //1是paypal
                m_PaypalRoot.SetActive(true);
                m_CashRoot.SetActive(false);
            }

            SetItemList();
            
            OnRefreshIconAndDoller();
            //是否暂时过 呼吸灯效果
            if (UIShopManager.Instance.GetShopListGuideShow() == 0)
            {
                m_PaypalItem_1.transform.localScale = Vector3.one * 0.9f;
                m_PaypalItemAnime = m_PaypalItem_1.transform.DOScale(Vector3.one * 1f, 0.5f).SetEase(Ease.OutQuad).SetLoops(-1, LoopType.Yoyo);
            }
        }
        
        private void SetItemList()
        {
            bool _isActive = false;
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            //设置item1
            if (_shopListItemDatas[0].m_IsPaying == 0)
            {
                m_CashingItem_1.gameObject.SetActive(false);
                m_PaypalingItem_1.gameObject.SetActive(false);
                m_CashItem_1.gameObject.SetActive(true);
                m_PaypalItem_1.gameObject.SetActive(true);
                m_CashingItem_1.InitData(_shopListItemDatas[0]);
                m_PaypalingItem_1.InitData(_shopListItemDatas[0]);
            }
            else
            {
                m_CashingItem_1.gameObject.SetActive(true);
                m_PaypalingItem_1.gameObject.SetActive(true);
                m_CashItem_1.gameObject.SetActive(false);
                m_PaypalItem_1.gameObject.SetActive(false);
                m_CashingItem_1.InitData(_shopListItemDatas[0]);
                m_PaypalingItem_1.InitData(_shopListItemDatas[0]);
                _isActive = true;
            }

            if (_shopListItemDatas[1].m_IsPaying == 0)
            {
                m_CashingItem_2.gameObject.SetActive(false);
                m_PaypalingItem_2.gameObject.SetActive(false);
                m_CashItem_2.gameObject.SetActive(true);
                m_PaypalItem_2.gameObject.SetActive(true);
                m_CashingItem_2.InitData(_shopListItemDatas[1]);
                m_PaypalingItem_2.InitData(_shopListItemDatas[1]);
            }
            else
            {
                m_CashingItem_2.gameObject.SetActive(true);
                m_PaypalingItem_2.gameObject.SetActive(true);
                m_CashItem_2.gameObject.SetActive(false);
                m_PaypalItem_2.gameObject.SetActive(false);
                m_CashingItem_2.InitData(_shopListItemDatas[1]);
                m_PaypalingItem_2.InitData(_shopListItemDatas[1]);
                _isActive = true;
            }

            if (_shopListItemDatas[2].m_IsPaying == 0)
            {
                m_CashingItem_3.gameObject.SetActive(false);
                m_PaypalingItem_3.gameObject.SetActive(false);
                m_CashItem_3.gameObject.SetActive(true);
                m_PaypalItem_3.gameObject.SetActive(true);
                m_CashingItem_3.InitData(_shopListItemDatas[2]);
                m_PaypalingItem_3.InitData(_shopListItemDatas[2]);
            }
            else
            {
                m_CashingItem_3.gameObject.SetActive(true);
                m_PaypalingItem_3.gameObject.SetActive(true);
                m_CashItem_3.gameObject.SetActive(false);
                m_PaypalItem_3.gameObject.SetActive(false);
                m_CashingItem_3.InitData(_shopListItemDatas[2]);
                m_PaypalingItem_3.InitData(_shopListItemDatas[2]);
                _isActive = true;
            }

            if (_shopListItemDatas[3].m_IsPaying == 0)
            {
                m_CashingItem_4.gameObject.SetActive(false);
                m_PaypalingItem_4.gameObject.SetActive(false);
                m_CashItem_4.gameObject.SetActive(true);
                m_PaypalItem_4.gameObject.SetActive(true);
                m_CashingItem_4.InitData(_shopListItemDatas[3]);
                m_PaypalingItem_4.InitData(_shopListItemDatas[3]);
            }
            else
            {
                m_CashingItem_4.gameObject.SetActive(true);
                m_PaypalingItem_4.gameObject.SetActive(true);
                m_CashItem_4.gameObject.SetActive(false);
                m_PaypalItem_4.gameObject.SetActive(false);
                m_CashingItem_4.InitData(_shopListItemDatas[3]);
                m_PaypalingItem_4.InitData(_shopListItemDatas[3]);
                _isActive = true;
            }
            
            if (_shopListItemDatas[4].m_IsPaying == 0)
            {
                m_CashingItem_5.gameObject.SetActive(false);
                m_PaypalingItem_5.gameObject.SetActive(false);
                m_CashItem_5.gameObject.SetActive(true);
                m_PaypalItem_5.gameObject.SetActive(true);
                m_CashingItem_5.InitData(_shopListItemDatas[4]);
                m_PaypalingItem_5.InitData(_shopListItemDatas[4]);
            }
            else
            {
                m_CashingItem_5.gameObject.SetActive(true);
                m_PaypalingItem_5.gameObject.SetActive(true);
                m_CashItem_5.gameObject.SetActive(false);
                m_PaypalItem_5.gameObject.SetActive(false);
                m_CashingItem_5.InitData(_shopListItemDatas[4]);
                m_PaypalingItem_5.InitData(_shopListItemDatas[4]);
                _isActive = true;
            }

            m_TxtMoneyTitle.gameObject.SetActive(_isActive);
        }
        
        private void OnRefreshIconAndDoller()
        {
            m_TxtTopCoin.text = PlayerPrefsManager.GetInt(PlayerPrefsManager.PLAYER_HISTROY_DOLLER_COUNT).ToString();
            m_TxtTopDoller.text = PlayerPrefsManager.GetInt(PlayerPrefsManager.PLAYER_HISTROY_DOLLER_COUNT).ToString();
        }
        
        private void OnTouchItem(int index)
        {
            int _doller = PlayerPrefsManager.GetInt(PlayerPrefsManager.PLAYER_HISTROY_DOLLER_COUNT);
            m_CurTouchItemIndex = index;
            if (_doller < m_CurTouchItemIndex * 1000)
            {
                m_ShopTips_7.SetActive(true);
                m_Tips_7_TxtTitle.text = Utils.GetTextByID("900134");
                NI.TTicker.AddDelayCallback(HideTips7, 1, 1);
            }
            else
            {
                m_ShopTips_6.SetActive(true);
                m_CurTouchItemIndex = index;
                SetTips6Data();
            }
        }

        private void HideTips7(object o)
        {
            m_ShopTips_7.SetActive(false);
        }
        
        private void SetTips6Data()
        {
            m_Tips_6_TxtTitle.text = string.Format(Utils.GetTextByID("900050",m_CurTouchItemIndex * 1000));
            m_Tips_6_TxtDollerNumber.text = string.Format("{0}K", m_CurTouchItemIndex);
        }

        private void OnTouchPayingItem(int index)
        {
            m_CurTouchPayingItemIndex = index;
            m_ShopTips_1.SetActive(true);
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            m_Tips_1_TxtShopProgress.text = $"{_shopListItemDatas[index - 1].m_CMCountProgress}/50";
            m_Tips_1_ImgShopProgress.fillAmount = _shopListItemDatas[index - 1].m_CMCountProgress / 50f;
        }

        private void OnTouchCashOutItem(int index)
        {
            m_CurTouchPayingItemIndex = index;
            m_ShopTips_2.SetActive(true);
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            m_Tips_2_TxtContent_1.text = UIShopManager.Instance.GetWithDrawAccount();
            m_Tips_2_TxtContent_2.text = $"${_shopListItemDatas[index - 1].m_Index * 1000}.00";
            m_Tips_2_TxtContent_3.text = Utils.GetTextByID("900073");
        }

        private void OnTouchPayItem(int index)
        {
            m_CurTouchPayingItemIndex = index;
            m_ShopTips_3.SetActive(true);
            //0是cashapp 1是paypal
            if (UIShopManager.Instance.GetShopWithDrawChannel() == 0)
            {
                m_Tips_3_TxtContent_1.text = Utils.GetTextByID("900043");
            }
            else
            {
                m_Tips_3_TxtContent_1.text = Utils.GetTextByID("900042");
            }
            m_Tips_3_TxtContent_2.text = UIShopManager.Instance.GetWithDrawYourName();
            m_Tips_3_TxtContent_3.text = $"${index * 1000}.00";

            CfgCashRewardConfig _cfgCashRewardConfig = ConfigManager.Instance.GetCfgCashRwardConfig(index.ToString());
            m_Tips_3_TxtContent_4.text = _cfgCashRewardConfig.PlatformFeeRate;//CfgCashRwardConfig.GetConfigTable(index).PlatformFeeRate;
            m_Tips_3_TxtContent_5.text = _cfgCashRewardConfig.ReceiptAmount;
            m_Tips_3_TxtContent_6.text = _cfgCashRewardConfig.LimitDiscounts;
            m_Tips_3_TxtContent_7.text = _cfgCashRewardConfig.SaveCost;
            m_Tips_3_TxtContent_8.text = _cfgCashRewardConfig.TotalFee;
        }

        private void OnTouchLastStateItem(int index)
        {
            m_ShopTips_4.SetActive(true);
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            m_Tips_4_TxtContent_1.text = _shopListItemDatas[index - 1].m_OrderNumber;
            if (UIShopManager.Instance.GetShopWithDrawChannel() == 0)
            {
                m_Tips_4_TxtContent_2.text = Utils.GetTextByID("900043");
            }
            else
            {
                m_Tips_4_TxtContent_2.text = Utils.GetTextByID("900042");
            }

            m_Tips_4_TxtContent_3.text = UIShopManager.Instance.GetWithDrawYourName();
            m_CurTouchPayingItemIndex = index;
            m_Tips_4_TxtContent_4.text = $"${_shopListItemDatas[index - 1].m_Index * 1000}.00";
            DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)
                .AddSeconds(_shopListItemDatas[index - 1].m_TimeStamp)
                .ToLocalTime();

            string formattedDateTime = dateTime.ToString("MM/dd/yyyy hh:mm:ss tt");
            m_Tips_4_TxtContent_5.text = formattedDateTime;
        }
        
        /// <summary>
        /// 点了restore的item
        /// </summary>
        /// <param name="index"></param>
        private void OnTouchReStoreItem(int index)
        {
            //直接进入第四阶段
            m_CurTouchPayingItemIndex = index;
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            _shopListItemDatas[index - 1].m_ItemState = 3;
            _shopListItemDatas[index - 1].m_IsPaying = 1;
            switch (index)
            {
                case 1:
                {
                    m_PaypalingItem_1.ResetData(_shopListItemDatas[index - 1]);
                    m_CashingItem_1.ResetData(_shopListItemDatas[index - 1]);
                    break;
                }
                case 2:
                {
                    m_PaypalingItem_2.ResetData(_shopListItemDatas[index - 1]);
                    m_CashingItem_2.ResetData(_shopListItemDatas[index - 1]);
                    break;
                }
                case 3:
                {
                    m_PaypalingItem_3.ResetData(_shopListItemDatas[index - 1]);
                    m_CashingItem_3.ResetData(_shopListItemDatas[index - 1]);
                    break;
                }
                case 4:
                {
                    m_PaypalingItem_4.ResetData(_shopListItemDatas[index - 1]);
                    m_CashingItem_4.ResetData(_shopListItemDatas[index - 1]);
                    break;
                }
                case 5:
                {
                    m_PaypalingItem_5.ResetData(_shopListItemDatas[index - 1]);
                    m_CashingItem_5.ResetData(_shopListItemDatas[index - 1]);
                    break;
                }
            }
            UIShopManager.Instance.SaveShopListDataItem(index);
            OnRefreshIconAndDoller();
            SetItemList();
        }

        private void OnTouchRightNowItem(int index)
        {
            m_CurTouchPayingItemIndex = index;
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            if (_shopListItemDatas[index - 1].m_Phase5CMCount >= 50)
            {
                _shopListItemDatas[index - 1].m_ItemState = 0;
                _shopListItemDatas[index - 1].m_Phase5CMCount = 0;
                _shopListItemDatas[index - 1].m_IsRestore = 1;
                _shopListItemDatas[index - 1].m_IsPaying = 0; 
                switch (index)
                {
                    case 1:
                    {
                        m_PaypalingItem_1.ResetData(_shopListItemDatas[index - 1]);
                        m_CashingItem_1.ResetData(_shopListItemDatas[index - 1]);
                        MainManager.Instance.AddDoller(1000);
                        //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,1000 * 100,EItemGotFromType.Bingo);
                        break;
                    }
                    case 2:
                    {
                        m_PaypalingItem_2.ResetData(_shopListItemDatas[index - 1]);
                        m_CashingItem_2.ResetData(_shopListItemDatas[index - 1]);
                        MainManager.Instance.AddDoller(2000);
                        //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,2000 * 100,EItemGotFromType.Bingo);
                        break;
                    }
                    case 3:
                    {
                        m_PaypalingItem_3.ResetData(_shopListItemDatas[index - 1]);
                        m_CashingItem_3.ResetData(_shopListItemDatas[index - 1]);
                        MainManager.Instance.AddDoller(3000);
                        //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,3000 * 100,EItemGotFromType.Bingo); 
                        break;
                    }
                    case 4:
                    {
                        m_PaypalingItem_4.ResetData(_shopListItemDatas[index - 1]);
                        m_CashingItem_4.ResetData(_shopListItemDatas[index - 1]);
                        MainManager.Instance.AddDoller(4000);
                        //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,4000 * 100,EItemGotFromType.Bingo);
                        break;
                    }
                    case 5:
                    {
                        m_PaypalingItem_5.ResetData(_shopListItemDatas[index - 1]);
                        m_CashingItem_5.ResetData(_shopListItemDatas[index - 1]);
                        MainManager.Instance.AddDoller(5000);
                        //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,5000 * 100,EItemGotFromType.Bingo); 
                        break;
                    }
                }
                UIShopManager.Instance.SaveShopListDataItem(index);
                OnRefreshIconAndDoller();
                SetItemList();
                ShowTips10();
            }
            else
            {
                m_Tips_11_TxtProgress.text = $"{_shopListItemDatas[index - 1].m_Phase5CMCount}/50";
                m_Tips_11_ImgProgress.fillAmount = _shopListItemDatas[index - 1].m_Phase5CMCount / 50f;
                m_ShopTips_11.SetActive(true);
            }
        }
        
        private void OnClickTopBackBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            MainManager.Instance.HideUIShop();
        }
        /// <summary>
        /// 打开信息填写界面
        /// </summary>
        private void OnClickReviseBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_5.SetActive(true);
            SetTips5Data();
        }

        private void SetTips5Data()
        {
            if (UIShopManager.Instance.GetShopWithDrawChannel() == 0)
            {
                //0是cashapp
                m_Tips_5_ImgCashSelect.SetActive(true);
                m_Tips_5_ImgPaypalSelect.SetActive(false);
                m_Tips_5_InputFieldDefault.text = Utils.GetTextByID("900099");//"Your Cash App Account";
            }
            else
            {
                //1是paypal
                m_Tips_5_ImgCashSelect.SetActive(false);
                m_Tips_5_ImgPaypalSelect.SetActive(true);
                m_Tips_5_InputFieldDefault.text = Utils.GetTextByID("900098");//"Your PayPal Account";
            }

            m_Tips_5_InputField_1.text = UIShopManager.Instance.GetWithDrawYourName();
            m_Tips_5_InputField_2.text = UIShopManager.Instance.GetWithDrawEmail();
            m_Tips_5_InputField_3.text = UIShopManager.Instance.GetWithDrawAccount();
            
            m_Tips_5_TxtContent_1.text =
                $"$ {PlayerPrefsManager.GetInt(PlayerPrefsManager.PLAYER_HISTROY_DOLLER_COUNT)}";
            m_Tips_5_TxtContent_2.text = GetTipsContent();//(DataManager.Instance.GetData<DataPlayerAsset>().SelectItem(EGiftType.BingoDoller) / (int)100).ToString();
        }

        private string GetTipsContent()
        {
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            for (int i = 0; i < _shopListItemDatas.Count; i++)
            {
                if (_shopListItemDatas[i].m_IsPaying == 0)
                {
                    return $"$ {i + 1}k";
                }
            }

            return "";
        }
        
        private void ShowTips9()
        {
            m_ShopTips_9.SetActive(true);
            NI.TTicker.AddCallback(HideTups9, 0.5f, 1);
        }

        private void HideTups9(object o)
        {
            m_ShopTips_9.SetActive(false);
        }

        private void ShowTips10()
        {
            switch (m_CurTouchPayingItemIndex)
            {
                case 1:
                {
                    m_Tips_10_Content_1.text = "1000";
                    break;
                }
                case 2:
                {
                    m_Tips_10_Content_1.text = "2000";
                    break;
                }
                case 3:
                {
                    m_Tips_10_Content_1.text = "3000";
                    break;
                }
                case 4:
                {
                    m_Tips_10_Content_1.text = "4000";
                    break;
                }
                case 5:
                {
                    m_Tips_10_Content_1.text = "5000";
                    break;
                }
            }
            m_ShopTips_10.SetActive(true);
        }
        
        //tip_1的所有按钮========================================================
        private void OnClickTips_1_PayBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            CfgCashRewardConfig _table = ConfigManager.Instance.GetCfgCashRwardConfig(m_CurTouchPayingItemIndex.ToString());
            int _gm = PlayerPrefs.GetInt("PayPalPass",0);
            if (_gm == 1)
            {
                //够次数更新payingItem的数据
                _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_ItemState = 1;
                switch (m_CurTouchPayingItemIndex)
                {
                    case 1: 
                    {
                        m_PaypalingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                        break;
                    }
                    case 2:
                    {
                        m_PaypalingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                        break;
                    }
                    case 3:
                    {
                        m_PaypalingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                        m_CashingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                        break;
                    }
                    case 4:
                    {
                        m_PaypalingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                        break;
                    }
                    case 5:
                    {
                        m_PaypalingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                        break;
                    }
                }
                UIShopManager.Instance.SaveShopListDataItem(m_CurTouchPayingItemIndex);
                m_ShopTips_1.SetActive(false);
            }
            else
            {
                //加入内购
                DataIAP.Instance.Purchase(_table.redeemCashIapKey1,(PurchaseResult PurchaseResult, string iapKey) =>
                {
                    if (PurchaseResult == PurchaseResult.Success)
                    {
                        //够次数更新payingItem的数据
                        _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_ItemState = 1;
                        switch (m_CurTouchPayingItemIndex)
                        {
                            case 1:
                            {
                                m_PaypalingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 2:
                            {
                                m_PaypalingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 3:
                            {
                                m_PaypalingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 4:
                            {
                                m_PaypalingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 5:
                            {
                                m_PaypalingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                        }
                        UIShopManager.Instance.SaveShopListDataItem(m_CurTouchPayingItemIndex);
                        m_ShopTips_1.SetActive(false);
                    }
                    else
                    {
                        ShowTips9();
                    }
                });   
            }
        }
        private void OnClickTips_1_CancelBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            if (m_PaypalItemAnime != null)
            {
                m_PaypalItemAnime.Kill();
                m_PaypalItemAnime = null;
            }
            m_ShopTips_1.SetActive(false);
        }
        private void OnClickTips_1_CloseBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_1.SetActive(false);
        }
        //tip_2的所有按钮========================================================
        private void OnClickTips_2_ConfirmBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            CfgCashRewardConfig _table = ConfigManager.Instance.GetCfgCashRwardConfig(m_CurTouchPayingItemIndex.ToString());
            
            int _gm = PlayerPrefs.GetInt("PayPalPass",0);
            if (_gm == 1)
            {
                _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_ItemState = 2;
                switch (m_CurTouchPayingItemIndex)
                {
                    case 1:
                    {
                        m_PaypalingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        break;
                    }
                    case 2: 
                    { 
                        m_PaypalingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        break;
                    } 
                    case 3: 
                    { 
                        m_PaypalingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        break;
                    } 
                    case 4: 
                    { 
                        m_PaypalingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        break;
                    } 
                    case 5: 
                    { 
                        m_PaypalingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        break;
                    }
                } 
                UIShopManager.Instance.SaveShopListDataItem(m_CurTouchPayingItemIndex); 
                m_ShopTips_2.SetActive(false);
            }
            else
            {
                DataIAP.Instance.Purchase(_table.redeemCashIapKey2,
                (PurchaseResult PurchaseResult, string iapKey) =>
                {
                    if (PurchaseResult == PurchaseResult.Success)
                    {
                        _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_ItemState = 2;
                        switch (m_CurTouchPayingItemIndex)
                        {
                            case 1:
                            {
                                m_PaypalingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 2:
                            {
                                m_PaypalingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 3:
                            {
                                m_PaypalingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 4:
                            {
                                m_PaypalingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 5:
                            {
                                m_PaypalingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                        }
                        UIShopManager.Instance.SaveShopListDataItem(m_CurTouchPayingItemIndex);  
                        m_ShopTips_2.SetActive(false);
                    }
                    else
                    {
                        ShowTips9();
                    }
                });   
            }
        }
        
        private void OnClickTips_2_CancelBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_2.SetActive(false);
        }
        //tip_3的所有按钮========================================================
        private void OnClickTips_3_ConfirmBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            CfgCashRewardConfig _table = ConfigManager.Instance.GetCfgCashRwardConfig(m_CurTouchPayingItemIndex.ToString());
            
            int _gm = PlayerPrefs.GetInt("PayPalPass",0);
            if (_gm == 1)
            {
                _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_ItemState = 3; 
                switch (m_CurTouchPayingItemIndex) 
                { 
                    case 1: 
                    { 
                        m_PaypalingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        break;
                    } 
                    case 2: 
                    { 
                        m_PaypalingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        break;
                    } 
                    case 3: 
                    { 
                        m_PaypalingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        break;
                    } 
                    case 4: 
                    { 
                        m_PaypalingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        break;
                    } 
                    case 5: 
                    { 
                        m_PaypalingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        m_CashingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                        break;
                    }
                } 
                UIShopManager.Instance.SaveShopListDataItem(m_CurTouchPayingItemIndex); 
                m_ShopTips_3.SetActive(false); 
            }
            else
            {
                DataIAP.Instance.Purchase(_table.redeemCashIapKey3,
                (PurchaseResult PurchaseResult, string iapKey) =>
                {
                    if (PurchaseResult == PurchaseResult.Success)
                    {
                        _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_ItemState = 3;
                        switch (m_CurTouchPayingItemIndex)
                        {
                            case 1:
                            {
                                m_PaypalingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 2:
                            {
                                m_PaypalingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 3:
                            {
                                m_PaypalingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 4:
                            {
                                m_PaypalingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                            case 5:
                            {
                                m_PaypalingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                m_CashingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]);
                                break;
                            }
                        }
                        UIShopManager.Instance.SaveShopListDataItem(m_CurTouchPayingItemIndex);
                        m_ShopTips_3.SetActive(false); 
                    }
                    else
                    {
                        ShowTips9();
                    }
                });   
            }
        }
        
        private void OnClickTips_3_CancelBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_3.SetActive(false);
        }
        
        private void OnClickTips_3_CloseBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_3.SetActive(false);
        }
        //tip_4的所有按钮========================================================
        private void OnClickTips_4_ConfirmBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_4.SetActive(false);
        }

        private void OnClickTips_4_WithdrawBtn()
        {
            //退单按键
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_ItemState = 4;
            switch (m_CurTouchPayingItemIndex)
            {
                case 1:
                {
                    m_PaypalingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                    m_CashingItem_1.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                    break;
                }
                case 2: 
                { 
                    m_PaypalingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                    m_CashingItem_2.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                    break;
                } 
                case 3: 
                { 
                    m_PaypalingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                    m_CashingItem_3.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                    break;
                } 
                case 4: 
                { 
                    m_PaypalingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                    m_CashingItem_4.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                    break;
                } 
                case 5: 
                { 
                    m_PaypalingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                    m_CashingItem_5.ResetData(_shopListItemDatas[m_CurTouchPayingItemIndex - 1]); 
                    break;
                }
            } 
            UIShopManager.Instance.SaveShopListDataItem(m_CurTouchPayingItemIndex); 
            m_ShopTips_4.SetActive(false);
        }
        //tip_5的所有按钮========================================================
        private void OnClickTips_5_CashBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_Tips_5_InputFieldDefault.text = "Your Cash App Account";
            m_Tips_5_ImgCashSelect.SetActive(true);
            m_Tips_5_ImgPaypalSelect.SetActive(false);
        }
        private void OnClickTips_5_PaypalBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_Tips_5_InputFieldDefault.text = "Your PayPal Account";
            m_Tips_5_ImgCashSelect.SetActive(false);
            m_Tips_5_ImgPaypalSelect.SetActive(true);
        }
        private void OnClickTips_5_CloseBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_5.SetActive(false);
        }
        private void OnClickTips_5_SubmitBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            if (m_Tips_5_InputField_1.text.Equals("") || m_Tips_5_InputField_2.text.Equals("") ||
                m_Tips_5_InputField_3.text.Equals(""))
            {
                return;
            }
            
            if (m_Tips_5_ImgCashSelect.activeSelf)
            {
                UIShopManager.Instance.SaveShopWithDrawChannel(0);
            }
            else
            {
                UIShopManager.Instance.SaveShopWithDrawChannel(1);
            }
            
            UIShopManager.Instance.SaveWithDrawData(m_Tips_5_InputField_1.text, m_Tips_5_InputField_2.text, m_Tips_5_InputField_3.text);
            if (UIShopManager.Instance.GetShopWithDrawChannel() == 0)
            {
                //0是cashapp
                m_PaypalRoot.SetActive(false);
                m_CashRoot.SetActive(true);
            }
            else
            {
                //1是paypal
                m_PaypalRoot.SetActive(true);
                m_CashRoot.SetActive(false);
            }
            if (UIShopManager.Instance.GetWithDrawEmail().Equals(""))
            {
                m_TxtReviseFont.text = Utils.GetTextByID("900039");
            }
            else
            {
                m_TxtReviseFont.text = UIShopManager.Instance.GetWithDrawAccount();
            }
            m_ShopTips_5.SetActive(false);
        }
        //tip_6的所有按钮========================================================
        private void OnClickTips_6_OkBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            //判断是否添加信息
            if (UIShopManager.Instance.GetWithDrawYourName() == "")
            {
                if (m_PaypalItemAnime != null)
                {
                    m_PaypalItemAnime.Kill();
                    m_PaypalItemAnime = null;
                }
                m_PaypalItem_1.transform.localScale = Vector3.one;
                UIShopManager.Instance.SaveShopListGuideShow();
                m_ShopTips_5.SetActive(true);
                SetTips5Data();
            }
            else
            {
                List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
                _shopListItemDatas[m_CurTouchItemIndex - 1].m_ItemState = 0;
                int _useDoller = 0;
                
                DateTime endTime = DateTime.Now.AddHours(24);
                long timestamp = new DateTimeOffset(endTime).ToUnixTimeSeconds();
                _shopListItemDatas[m_CurTouchItemIndex - 1].m_TimeStamp = timestamp;
                _shopListItemDatas[m_CurTouchItemIndex - 1].m_IsPaying = 1;
                switch (m_CurTouchItemIndex)
                {
                    case 1:
                    {
                        m_PaypalingItem_1.gameObject.SetActive(true);
                        m_CashingItem_1.gameObject.SetActive(true);
                        m_PaypalingItem_1.ResetData(_shopListItemDatas[m_CurTouchItemIndex - 1]);
                        m_CashingItem_1.ResetData(_shopListItemDatas[m_CurTouchItemIndex - 1]);
                        m_CashItem_1.gameObject.SetActive(false);
                        m_PaypalItem_1.gameObject.SetActive(false);
                        _useDoller = 1000;
                        break;
                    }
                    case 2:
                    {
                        m_PaypalingItem_2.gameObject.SetActive(true);
                        m_CashingItem_2.gameObject.SetActive(true);
                        m_PaypalingItem_2.ResetData(_shopListItemDatas[m_CurTouchItemIndex - 1]);
                        m_CashingItem_2.ResetData(_shopListItemDatas[m_CurTouchItemIndex - 1]);
                        m_CashItem_2.gameObject.SetActive(false);
                        m_PaypalItem_2.gameObject.SetActive(false);
                        _useDoller = 2000;
                        break;
                    }
                    case 3:
                    {
                        m_PaypalingItem_3.gameObject.SetActive(true);
                        m_CashingItem_3.gameObject.SetActive(true);
                        m_PaypalingItem_3.ResetData(_shopListItemDatas[m_CurTouchItemIndex - 1]);
                        m_CashingItem_3.ResetData(_shopListItemDatas[m_CurTouchItemIndex - 1]);
                        m_CashItem_3.gameObject.SetActive(false);
                        m_PaypalItem_3.gameObject.SetActive(false);
                        _useDoller = 3000;
                        break;
                    }
                    case 4:
                    {
                        m_PaypalingItem_4.gameObject.SetActive(true);
                        m_CashingItem_4.gameObject.SetActive(true);
                        m_PaypalingItem_4.ResetData(_shopListItemDatas[m_CurTouchItemIndex - 1]);
                        m_CashingItem_4.ResetData(_shopListItemDatas[m_CurTouchItemIndex - 1]);
                        m_CashItem_4.gameObject.SetActive(false);
                        m_PaypalItem_4.gameObject.SetActive(false);
                        _useDoller = 4000;
                        break;
                    }
                    case 5:
                    {
                        m_PaypalingItem_5.gameObject.SetActive(true);
                        m_CashingItem_5.gameObject.SetActive(true);
                        m_PaypalingItem_5.ResetData(_shopListItemDatas[m_CurTouchItemIndex - 1]);
                        m_CashingItem_5.ResetData(_shopListItemDatas[m_CurTouchItemIndex - 1]);
                        m_CashItem_5.gameObject.SetActive(false);
                        m_PaypalItem_5.gameObject.SetActive(false);
                        _useDoller = 5000;
                        break;
                    }
                }
                
                MainManager.Instance.SubDoller(_useDoller);
                OnRefreshIconAndDoller();
                m_TxtMoneyTitle.gameObject.SetActive(true);
                UIShopManager.Instance.SaveShopListDataItem(m_CurTouchItemIndex);
                
                m_CashItem_1.ResetData();
                m_PaypalItem_1.ResetData();
                m_CashItem_2.ResetData();
                m_PaypalItem_2.ResetData();
                m_CashItem_3.ResetData();
                m_PaypalItem_3.ResetData();
                m_CashItem_4.ResetData();
                m_PaypalItem_4.ResetData();
                m_CashItem_5.ResetData();
                m_PaypalItem_5.ResetData();   
            }
            m_ShopTips_6.SetActive(false);
        }
        private void OnClickTips_6_NoBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_6.SetActive(false);
        }

        private void OnClickTips8CloseBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_8.SetActive(false);
        }

        private void OnClickRuleBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_8.SetActive(true);
        }
        //tips_10按钮事件=================================================================
        private void OnClickTips_10_ClaimBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_10.SetActive(false);
        }
        
        private void OnClickTips_10_CloseBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_10.SetActive(false);
        }
        //tips_11按钮事件=================================================================
        private void OnClickTips_11_CloseBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_11.SetActive(false);
        }

        private void OnClickTips_11_CancelBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            m_ShopTips_11.SetActive(false);
        }

        private void OnClickTips_11_PayBtn()
        {
            AudioManager.Instance.PlaySound("Audio/Effect/btnClick");
            List<ShopListItemData> _shopListItemDatas = UIShopManager.Instance.GetShopListItemData();
            CfgCashRewardConfig _table = ConfigManager.Instance.GetCfgCashRwardConfig(m_CurTouchPayingItemIndex.ToString());
            
            int _gm = PlayerPrefs.GetInt("PayPalPass",0);
            if (_gm == 1)
            {
                _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_ItemState = 0;
                _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_IsRestore = 1;
                _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_Phase5CMCount = 0;
                _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_IsPaying = 0; 
                switch (m_CurTouchPayingItemIndex) 
                { 
                    case 1: 
                    {
                        //退钱
                        MainManager.Instance.AddDoller(1000);
                        //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,1000 * 100,EItemGotFromType.Bingo);
                        break;
                    } 
                    case 2: 
                    { 
                        MainManager.Instance.AddDoller(2000);
                        //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,2000 * 100,EItemGotFromType.Bingo);
                        break;
                    } 
                    case 3: 
                    { 
                        MainManager.Instance.AddDoller(3000);
                        //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,3000 * 100,EItemGotFromType.Bingo);
                        break;
                    } 
                    case 4: 
                    { 
                        MainManager.Instance.AddDoller(4000);
                        //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,4000 * 100,EItemGotFromType.Bingo);
                        break;
                    } 
                    case 5: 
                    { 
                        MainManager.Instance.AddDoller(5000);
                        //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,5000 * 100,EItemGotFromType.Bingo);
                        break;
                    }
                }
                UIShopManager.Instance.SaveShopListDataItem(m_CurTouchPayingItemIndex); 
                
                m_ShopTips_11.SetActive(false);
                OnRefreshIconAndDoller();
                SetItemList();
                ShowTips10();
            }
            else
            {
                DataIAP.Instance.Purchase(_table.redeemCashIapKey4,
                (PurchaseResult PurchaseResult, string iapKey) =>
                {
                    if (PurchaseResult == PurchaseResult.Success)
                    {
                        _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_ItemState = 0;
                        _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_Phase5CMCount = 0;
                        _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_IsRestore = 1;
                        _shopListItemDatas[m_CurTouchPayingItemIndex - 1].m_IsPaying = 0; 
                        switch (m_CurTouchPayingItemIndex)
                        {
                            case 1:
                            {
                                MainManager.Instance.AddDoller(1000);
                                //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,1000 * 100,EItemGotFromType.Bingo);
                                break;
                            }
                            case 2:
                            {
                                MainManager.Instance.AddDoller(2000);
                                //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,2000 * 100,EItemGotFromType.Bingo);
                                break;
                            }
                            case 3:
                            {
                                MainManager.Instance.AddDoller(3000);
                                //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,3000 * 100,EItemGotFromType.Bingo);
                                break;
                            }
                            case 4:
                            {
                                MainManager.Instance.AddDoller(4000);
                                //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,4000 * 100,EItemGotFromType.Bingo);
                                break;
                            }
                            case 5:
                            {
                                MainManager.Instance.AddDoller(5000);
                                //DataManager.Instance.GetData<DataPlayerAsset>().GainItem(EGiftType.BingoDoller,5000 * 100,EItemGotFromType.Bingo);
                                break;
                            }
                        }
                        UIShopManager.Instance.SaveShopListDataItem(m_CurTouchPayingItemIndex);
                        m_ShopTips_11.SetActive(false);
                        OnRefreshIconAndDoller();
                        SetItemList();
                        m_CashItem_1.ResetData();
                        m_PaypalItem_1.ResetData();
                        m_CashItem_2.ResetData();
                        m_PaypalItem_2.ResetData();
                        m_CashItem_3.ResetData();
                        m_PaypalItem_3.ResetData();
                        m_CashItem_4.ResetData();
                        m_PaypalItem_4.ResetData();
                        m_CashItem_5.ResetData();
                        m_PaypalItem_5.ResetData();  
                        ShowTips10();
                    }
                    else
                    {
                        ShowTips9();
                    }
                });   
            }
        }
        
    }
}